 {extend name="layout:base" /}{block name="content"}

 <?php
$global=isSupperManagerForSession();
 ?>
 <link rel="stylesheet" type="text/css" href="/static/My97DatePicker/skin/WdatePicker.css" />
     <script charset="utf-8" src="/static/My97DatePicker/WdatePicker.js"></script>
<style type="text/css">
  .yg_inp>input{margin-bottom: 10px;}
#zc_detail table{margin:10px;}
#zc_detail table tr td{
	border: 1px solid #ddd;
	height:40px;
	line-height:40px;
	padding-left:5px;
	padding-right:5px;
} 
.ordertable input {width:90%;}
.policeLable{padding:2px 4px;margin-left:4px;}
#taskDate .taskDateItem{
	width:100%;height:40px;line-height:40px;margin:4px 0px;
}
#taskDate .taskDateItem .taskDateItemLeft{width:10%;float:left;}
#taskDate .taskDateItem .taskDateItemRight1{width:70%;float:left;border:1px solid #139667;height: 42px;}
#taskDate .taskDateItem .taskDateItemRight2{width:20%;float:right;}
#taskDate .taskDateItem .opUsers img{width:22px;margin-left:5px;}

#taskDate .taskDateItem .itemUser{padding: 4px 6px;background:#139667;margin-left:4px;color:white;}
#taskDate .taskDateItem .clear{clear:both;width:0px;height:0px;overflow:hidden;}
#taskDate .taskDateItem .jia,#taskDate .taskDateItem .jian{font-size:30px;cursor:pointer;font-weight:800;margin-left:5px;}

</style>

<!--引入JS-->
<script type="text/javascript" src="/static/admin/js/ajaxfileupload.js"></script>

<section class="topBanners">
         <div class="icon"></div>
         <div class="topBannersNav">
        <span data-url="/admin/ver/lists" onclick="ContentLoadGo('/admin/ver/lists')">访客管理</span>
         >
         <span data-url="/admin/ver/editData"  onclick="ContentLoadGo('/admin/ver/editData?id=<?php echo $id; ?>')"  >访客编辑</span>
         
         </div>
      </section>
 <section id="zc_detail">

      <input type="hidden" value="<?php echo $id; ?>" id="editId" />
     
   <table class="ordertable" border="0" cellspacing="0" cellpadding="0" style="width:90%;">

	
      <tr>
       
       <td style="width:10%;"><div align="right">版本名称</div></td>
       <td style="widdth:90%;"  class="tr_cons">
       <input type="text" name="e-ver" id="e-ver" value="<?php echo $info['ver'] ?>" placeholder="版本名称，如  V1.1.0" class="textbox" style="padding:0px;" />
       </td>
     
       </tr>
       
    
     <tr>
       
       <td style="width:10%;"><div align="right">版本号</div></td>
       <td style="widdth:90%;"  class="tr_cons">
       <input type="text" name="e-num" id="e-num" value="<?php echo $info['num'] ?>" placeholder="版本号，整数，如  100" class="textbox" style="padding:0px;" />
       </td>
     
     </tr>
     
     
     
     
      <tr>
         <td><div align="right">软件包</div></td>
         <td colspan="7">
            <form id="jvForm" name="jvForm" action="/api/face/updateImage1" method="post" enctype="multipart/form-data">
            <input type="hidden" name="e-mpic" id="e-mpic" value="<?php echo $info['url'] ?>" />
              <a style="position:relative;display:block;width:100px;height:30px;background:#EEE;border:1px solid #999;text-align:center;line-height:30px;"  href="javascript:void(0);" >上传文件
                <input style="position:absolute;left:0;top:0;width:100px;height:30px;z-index:999;opacity:0;" onchange="uploadPic()" type="file" name="file" id="file"  />
                </a>
           
            <div id="updateimg"><a href="<?php echo $info['url'] ?>"><?php echo $info['url'] ?></a></div>
              </form>
         </td>
      </tr>
     
      <tr>
         <td><div align="right">备注</div></td>
         <td colspan="7">
            <textarea name="e-memo" id="e-memo" cols="60" rows="2" style="margin-top:2px;"><?php echo $info['memo'] ?></textarea>
            <div style="font-size:14px;color:red;">提示：不能够超过50个字</div>
         </td>
      </tr>
     
     <tr>
       <td colspan="8" style="height:50px;text-align:center;">
       
     
	   <input type="button" power="70000"  style="width:80px;margin-top:4px;margin-bottom:4px;padding:0px;" value="编辑" class="link_btn edit"/>
      
      	

       </td>
     </tr>
     
     
   </table>

     </section>
     
     
       <script type="text/javascript">

       function uploadPic()
       {
    	
    		 $.ajaxFileUpload(
    		   {
	    		   	url: '/api/face/uploadImage1', //用于文件上传的服务器端请求地址
	    		   	secureuri: false, //是否需要安全协议，一般设置为false
	    		   	fileElementId: 'file', //文件上传域的ID
	    		   	dataType: 'text/plain', //返回值类型 一般设置为json
	    		   	success: function (data, status) //服务器成功响应处理函数
	    		   	{
	    		   	 if(data.err==0)
	                   {
	                	   var img='<a href="'+data.data.pic+'" target="_blank"><img src="'+data.data.pic+'" style="width:120px;margin:5px;" />';
	                   $("#updateimg").html(img);
	                   $("#e-mpic").val(data.data.pic);
	                   }
	    		   },
	    		   error: function (data, status, e)//服务器响应失败处理函数
	    		   {
	    		   	alert(e);
	    		   }
    		   }
    		 )
    		   return false;
    		   
       }
      
      function myResearch(){
		   var url="/admin/ver/editData";
		   var id=$("#editId").val();
		 
		   ContentLoadGo(url+"?id="+id);
		   
	   }
    
      
           $(function(){
        	   var gnum=0;
        	   var lastObj;
        
        	   
			
          	//编辑项
          	    $(".edit").unbind().bind("click",function(){
          	    	
          	     var that =this;
           		 var url="/admin/ver/editData";

           		 var ver=$("#e-ver").val();
           		 var num=$("#e-num").val();
           		 var pic=$("#e-mpic").val();
                 var memo=$("#e-memo").val();
               
        		    
        		if(ver=="")
         		{
         			ErrTiShi("版本名称不能够为空");return false;
         		}
        		 
        		if(num=="")
         		{
         			ErrTiShi("版本号不能够为空");return false;
         		}
        		if(pic=="")
         		{
         			ErrTiShi("软件包不能够为空");return false;
         		}
        		
        	
        		var param={
            		    ver:ver,
            		    num:num,
            		    url:pic,
            		    memo:memo,
    				    sys_opt:'editData'//后台判断编辑操作
    		        };
           		//alert(JSON.stringify(param));return false;
           		    
        			 AjaxRequest(url,param,function(data){
          			   if(data.err==0)
          			   {
          				   SuccessTiShi("操作成功");
          				  
          				 myResearch();
          			   }
          			   else
          			   {
          				   ErrTiShi(data.msg);
          			   }
          		   	});
          			
          	   });
        	   
          	 
        	
        
        	   
        	   
        	   $(".info").click(function(){
        		   var that =this;
        		   var url="/admin/devlist/infoData";
        		   var id=$(that).parent().parent().attr('data-id');
        		   var param={
        				   id:id
        		   };
        		  // MyContentLoad(url,param);
        			ContentGet(url,param)	 
        				
        			 //弹出：确认按钮
        			
        	   });
        	   
        	  
  			   //全选
  		
  				$("#all").click(function(){   
			    	if(this.checked){   
			        	$(".checkBoxInput").attr("checked", true);  
			        	$(".checkBoxInput").prop("checked", true);  
			    	}else{   
						$(".checkBoxInput").attr("checked", false);
						$(".checkBoxInput").prop("checked", false);
			    	}   
			    	var se=getAllSelectItem();
			    	//console.log(se);
			 	}); 
  				 //导航
         	   $(".topBannerItem").click(function(){
         		   
         		   var attArr = $(this).attr();
             	   goToSelfLink(attArr);
             	   
         			
         	   });
  			   
  				 $(".firstTypeR").change(function(){
    				   
    				   var url="/admin/devlist/selectTypeChange";
    		   		    var id=$(this).val();
    		   		   
    		   		    var param={
    		   				   id:id
    		   				   
    		   		    };
    				   AjaxRequest(url,param,function(data){
    		  			   if(data.err==0)
    		  			   {
    		  				   var html='<option value="">--选择--</option>';
    		  				   $.each(data.data,function(i,v){
    		  					 html +='<option value="'+v.id+'">'+v.dname+'</option>'
    		  				   })
    		  				   $(".secondTypeR").html(html);
    		  			   }
    		  			   else
    		  			   {
    		  				   ErrTiShi("操作失败");
    		  			   }
    		  		   	});
    				   
    			   });
  			
           });
           
	  </script>
	  	  
	  {/block}
	  